from django.urls import path
from. import views
from rest_framework.routers import DefaultRouter

urlpatterns = [
    # path('posts/', views.SysPostListView.as_view(), name='sys_post_list'),
    # path('posts/<int:pk>', views.SysPostDetailView.as_view(), name='sys_post_detail'),
    # path('posts/', views.SysPostListAPIView.as_view(), name='sys_post_list'),
    # path('posts/<int:pk>', views.SysPostDetailAPIView.as_view(), name='sys_post_detail'),
    # path('posts/', views.SysPostListGenericsAPIView.as_view(), name='sys_post_list'),
    # path('posts/<int:pk>', views.SysPostDetailGenericsAPIView.as_view(), name='sys_post_detail'),
    # path('posts/', views.SysPostViewSet.as_view({'get': 'list','post':'create'}), name='sys_post_list'),
    # path('posts/<int:pk>',views.SysPostViewSet.as_view({'get':'retrieve','put':'update','delete':'destroy'}), name='sys_post_detail'),

    # path('posts/', views.SysPostModelViewSet.as_view({'get': 'list','post':'create'}), name='sys_post_list'),
    # path('posts/lasest_post/', views.SysPostModelViewSet.as_view({'get': 'lasest_post'}), name='sys_post_list'),
    # path('posts/<int:pk>',views.SysPostModelViewSet.as_view({'get':'retrieve','put':'update','delete':'destroy'}), name='sys_post_detail'),
    # path('posts/<int:pk>/update_post_name',views.SysPostModelViewSet.as_view({'put':'update_post_name'}), name='sys_post_detail')
]
router = DefaultRouter()
# router.register(r'posts', views.SysPostModelViewSet, basename='sys_post')
urlpatterns += router.urls